//
//  UtilsCommon.h
//  Coin
//
//  Created by 杨洋 on 2018/6/10.
//  Copyright © 2018年 zzg. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface UtilsCommon : NSObject

#pragma mark - 获取文件大小
+ (CGFloat)getfileSize:(NSString *)path;
#pragma mark - 压缩一个视频文件并转为mp4格式
+ (void)compressVideoFileURL:(NSURL*) fileURL
             completeHanlder:(void(^)(NSURL*)) handler;
#pragma mark - 隐藏手机号中间四位数字
+ (NSString *) numberSuitScanf:(NSString*)number ;

#pragma mark - 生成一个四位的随机数
+ (NSInteger) random4Number;

+ (UIViewController*)currentViewController;
+ (NSString*) stringLanguageFromLanguage:(NSString*) language;

#pragma mark - 计算文字高度
+ (CGFloat) heightForString:(NSString *)value
                       font:(UIFont*) font
                andMaxWidth:(CGFloat) width;

#pragma mark - 计算textview 文本高度
+ (CGFloat) heightForTextView:(UITextView *)textView andWidth:(CGFloat)width;

#pragma mark - 创建一个二维码图片
+ (UIImage *)creatQRcodeWithUrlstring:(NSString *)urlString imageSize:(CGSize) size;

+ (NSString*)dateFormatWithMilliseconds:(NSTimeInterval) milliseconds;

+ (NSString*)HHmmssMilliseconds:(NSInteger) milliseconds;
+ (NSString*)yyyyMMddHHmmssMilliseconds:(long long) milliseconds;

+ (NSTimeInterval) timeIntervalForDateFormat:(NSString*) format date:(NSString*) date;

#pragma mark - 更具颜色值创建图片
+ (UIImage*) createImageWithColor:(UIColor*) color;

@end
